<!--
 * @Description: Suspense 异步组件加载
 * @Author: James324
 * @Date: 2023-10-28 13:50:17
 * @LastEditors: James324
 * @LastEditTime: 2024-02-19 17:10:41
-->
<script setup lang="ts">
interface Props {
    title?: string;
    size?: string;
    color?: string;
}
withDefaults(defineProps<Props>(), {
    title: '正在载入...',
    size: '24px',
    color: '#06f'
});
</script>

<template>
    <Suspense>
        <template #fallback>
            <q-async-loading v-bind="$props">
                <p>{{ title }}</p>
            </q-async-loading>
        </template>
        <template #default>
            <slot />
        </template>
    </Suspense>
</template>
